<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>login</title>
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/loginstyle.css" rel="stylesheet">
    <script src="/js/jquery.min.js"></script>
</head>
<body>
<div class="container-fluid one">
    <div class="row">
        <form th:action="@{/admin/login}" method="post" class="formstyle">
            <h2 >管理员登录</h2>
            <div class="form-group">
                <label> 用户名：	</label>
                <input class="form-control" type="text" name="username" placeholder="请输入管理员名" required>
                <br/></div>
            <div class="form-group">
                <label>密&nbsp;&nbsp;&nbsp;码：	</label>
                <input class="form-control" type="password" name="password" placeholder="请输入您的密码" required>
                <br/></div>
            <div class="form-group text-center">
                <input class="btn btn-primary" type="submit" value="登录">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input class="btn btn-primary" type="reset" value="重置">
            </div>
            <span th:text="${msg}" style="display:none;" id="errorMsg"></span>
        </form>
    </div>
</div>
<script>
    window.onload = function() {
        var errorMessage = document.getElementById('errorMsg').textContent;
        if (errorMessage) {
            alert(errorMessage);
        }
    };
</script>
</body>
</html>